import java.sql.*;
public class otherData  {
	public static void main(String args[]) throws Exception
	{
		ResultSet rs;
		myDb m = new myDb();
	rs = m.executeQuery("select * from studen");
	while(rs.next())
	{
		System.out.println(rs.getString(1)+","+rs.getString("name"));
	}
		
	int result = m.update("update studen set id=9 where name='tom'");
	
	if(result==0)
	{
		System.out.println("updated unsuccessfully!");
	}
	else
	{
		System.out.println("updated successfully!");
	}
	int r1=m.update("insert into studen values(4,'kate')");
	if(r1==0)
	{
		System.out.println("inserted unsuccessfully!");
	}
	else
	{
		System.out.println("inserted successfully!");
	}
	}
}
